from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate
from patagent.llm import PatsnapLLM
from patagent.prompt import CHITCHAT_PROMPT

llm = PatsnapLLM()

# Prompt
chitchat_prompt = ChatPromptTemplate.from_messages(
    [
        ("system", CHITCHAT_PROMPT),
        ("human", "question: \n\n {question}"),
    ]
)

# Chain
chitchat_chain = chitchat_prompt | llm | StrOutputParser()